import {App} from 'vue';
import * as echarts from 'echarts';
import http from './api';
import {isValidKey} from './utils/common';
const registerGlobalProperties = (app: App): void => {
    const options = {
        $http: http,
        $echarts: echarts
    }
    for (const key in options) {
        if (isValidKey(key, options)) {
            app.config.globalProperties[key] = options[key]
        }
    }
}

export default registerGlobalProperties;